<%@ include file="/WEB-INF/common/taglibs.jsp"%>
<c:if test="${level == 0}">
	<ul id="tree" class="nav nav-list">
</c:if>



<c:forEach var="cur" items="${channels}" varStatus="vs">
	<c:set var="index" value="${index + 1}" scope="request" />

	<c:choose>
		<c:when test="${fn:length(cur.children) > 0}">
			<li class="nav-header"><span ><a href="#"></a>${cur.name}</span> <span
				class="folder"> </span>
			<ul>
				<c:set var="level" value="${level + 1}" scope="request" />
				<c:set var="channels" value="${cur.children}" scope="request" />
				<c:import url="/WEB-INF/content/admin/tree.jsp" />
				<!-- loop -->
			</ul>
			</li>
		</c:when>
		<c:otherwise>
			<c:choose>
				<c:when test="${level == 0}">
					<li class="nav-header">${cur.name} </li>
				</c:when>
				<c:otherwise>
					<li><a href="#"><span>${cur.name}</span></a></li>
				</c:otherwise>
			</c:choose>
		</c:otherwise>
	</c:choose>
	<c:if test="${level == 0}">
		<li class="divider">
	</c:if>

</c:forEach>



<c:set var="level" value="${level - 1}" scope="request" />
<c:if test="${index == 0}">
	</ul>
</c:if>
